<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
       var sum = 100;
       while(sum>=0){
       var input = prompt('请输入你要的操作：\n 1.存钱\n 2.取钱\n 3.显示余额\n 4.退出');
       if(input == 1){
          var add = prompt('请输入你要存入的金额：');
          sum+=parseFloat(add);
          alert('您现在的余额是：' + sum + '元');
       }
       else if(input == 2){
         var del = prompt('请输入你要取走的金额：');
         sum-=parseFloat(del);
         if(sum<0){
            alert('不好意思，您的卡内余额不足！');
         }
         else{
         alert('您现在的余额是：' + sum + '元');
         }
       }
       else if(input == 3){
        alert('您现在的余额是：' + sum + '元');
       }
       else if(input == 4){
        alert('退出成功！');
        break;
       }
    }
    </script>
</head>
<body>
    
</body>
</html>